package model

import (
	"time"
)

const DefineBuildLevelName = "define_build_level"

type DefineBuildLevel struct {
	Id      int               `json:"id" orm:"auto" sql:"INT"`
	Name    map[string]string `json:"name" sql:"JSON"`
	Desc    map[string]string `json:"desc" sql:"JSON"`
	BuildId int               `json:"build_id" sql:"INT"`
	Level   int               `json:"level" sql:"INT"`

	Show        []interface{} `json:"show" sql:"JSON"`
	CanDefense  bool          `json:"can_defense" sql:"TINYINT"`
	DefendRange byte          `json:"defend_range" sql:"TINYINT"`
	RecoverTime int           `json:"recover_time" sql:"INT"`
	BuildTime   int           `json:"build_time" sql:"INT"`

	Require    CompareDataRelationSlice `json:"require" sql:"JSON"`
	Consume    DataRelationSlice        `json:"consume" sql:"JSON"`
	Effect     DataRelationSlice        `json:"effect" sql:"JSON"`
	EffectText ShowTextSlice            `json:"effect_text" sql:"JSON"`

	SyncDefault []int `json:"sync_default" sql:"JSON"`

	UpdateTime *time.Time `json:"update_time" orm:"updateTime" sql:"DATETIME"`
}
